package com.biz.primus.ms.commodity.dao.po;

import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 门店商品
 *
 * @author david-liu
 * @date 2016年12月16日
 * @reviewer
 * @see
 */
@Data
@Entity
@Table(name = "pro_product_depot", uniqueConstraints = {@UniqueConstraint(columnNames = {"product_id", "depotId","depotCode"})})
public class DepotProduct extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -5692684536049410988L;

    /**
     * 门店商品商品信息
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "product_id", nullable = false)
    private Product product;

    /**
     * 门店ID
     */
    @Column(name = "depotId", nullable = false)
    private Long depotId;

    /**
     * 门店编码
     */
    @Column(name = "depotCode",nullable = false)
    private String depotCode;

    /**
     * 省id
     */
    private Integer provinceId;
    /**
     * 门店商品排序
     */
    @Column(name = "depot_product_order",nullable = false)
    private Integer depotProductOrder;

}
